package com.jh3502.vivo.net;


public final class ApiConstants {
    public static final int DATA_SOURCE_TYPE_DEV = 1;
    public static final int DATA_SOURCE_TYPE_TEST = 2;
    public static final int DATA_SOURCE_TYPE_ONLINE = 3;
    private static final String TAG = "ApiConstants";
    private static final String ONLINE_HOST = "lt.3502.com.cn:9005";
    private static final String TEST_HOST = "192.168.169.23:9009";
    private static final String DEV_HOST = "192.168.1.139";
    public static String API_NAME;
    private static String BASE_API_HOST;

    public static String getApiHost() {
        String s = BASE_API_HOST;
        return "http://" + BASE_API_HOST;
    }

//    public static String getUploadImageUrlSingle() {
//        String s = getApiHost();
//        return getApiHost() + "/appww/uploadHeader";
//    }

//    public static String getUploadImageUrlMulti() {
//        String s = getApiHost();
//        return getApiHost() + "/appww/upload";
//    }

    public static String getUploadImageUrl() {
        String s = getApiHost();
        return getApiHost() + "/appww/upload";
    }

    public static String getUploadFileUrl(String id) {
        return getApiHost() + "web/file/" + id;
    }

    public static String sChooseApi(int which) {
        switch (which) {
            case DATA_SOURCE_TYPE_DEV:
                BASE_API_HOST = DEV_HOST;
                API_NAME = "DEV";
                break;
            case DATA_SOURCE_TYPE_TEST:
                BASE_API_HOST = TEST_HOST;
                API_NAME = "TEST";
                break;
            case DATA_SOURCE_TYPE_ONLINE:
                BASE_API_HOST = ONLINE_HOST;
                API_NAME = "ONLINE";
                break;
            default:
        }
        return getApiHost();
    }
}